package com.shenghuai.bclient.stores.common

import androidx.lifecycle.DefaultLifecycleObserver
import androidx.lifecycle.LifecycleOwner

open class OnResumeLifeObserver constructor(val resumeUnit: () -> Unit) : DefaultLifecycleObserver {
    override fun onResume(owner: LifecycleOwner) {
        super.onResume(owner)
        resumeUnit()
        owner.lifecycle.removeObserver(this)
    }
}